package com.naiterui.ehp.bp.security.exception;

import lombok.Getter;

public class AuthenticationException extends org.springframework.security.core.AuthenticationException {

    private static final long serialVersionUID = -7095146522706931588L;

    @Getter
    private Object data;
    @Getter
    private int code = -1;

    public AuthenticationException(String message) {
        super(message);
    }

    public AuthenticationException(String message, int errorCode, Object data) {
        super(message);
        this.data = data;
        this.code = errorCode;
    }

    public AuthenticationException(String message, Throwable cause) {
        super(message, cause);
    }

    public AuthenticationException(String message, Throwable cause, int errorCode, Object data) {
        super(message, cause);
        this.data = data;
        this.code = errorCode;
    }

}
